<template>
	<view class="list-box">
		<view class="list bg-black mar-bottom-24 flex betweenX radius24" @click="hanldeInfo(item.id)"
			v-for="(item,index) in list" :key="index">
			<view class="columnY betweenY mar-right-24 flex-w">
				<view class="multi2 color-white font-28">{{item.title}}</view>
				<view class="centerXY betweenX">
					<view class="type pad-left-right-12 pad-top-bottom-6 radius30 font-20">{{item.cate_name}}</view>
					<view class="font-20 color-grey"> {{$u.timeFormat(item.created_at, 'yyyy-mm-dd hh:MM')}}</view>
				</view>
			</view>
			<!-- <image class="notice-image radius24 shrink" :src="item.cover"></image> -->
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array | Object,
				default: () => ([])
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			// 改变状态
			hanldeInfo(id) {
				uni.navigateTo({
					url: '/pages/notice/noticeDetails?id=' + id,
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.notice-image {
		display: block;
		width: 246rpx;
		height: 160rpx;
	}

	.type {
		background-color: #E26CFF;
		// border: 1rpx solid #f2f2f2;
	}

	.list {
		height: 130rpx;
		padding: 30rpx;
	}
	
</style>